package classes.view.component
{
	import com.d4p.custom.defaultButton.DefaultBtn;
	
	import flash.display.MovieClip;
	import flash.display.Sprite;
	
	public class PagingNumber extends DefaultBtn
	{
		private var _pagingNum:int;
		
		protected var _pagingText_A:MovieClip;
		protected var _pagingText_B:MovieClip;
		
		public function PagingNumber()
		{
			super();
			setLayOut();
		}
		protected function setLayOut():void
		{
			this._pagingText_A	=	this.getChildByName('paging_a')	as MovieClip;
			this._pagingText_B	=	this.getChildByName('paging_b')	as MovieClip;
		}
		
		public function set selectPage($select:Boolean):void
		{
			if($select){
				this.mouseChildren = false;
				this.mouseEnabled  = false;
				
				init = false;
				stopFrame();
				gotoAndStop("over");
			}else{
				this.mouseChildren = true;
				this.mouseEnabled  = true;
				playFrame("out");
				init = true;
			}
		}
		
		public function set pagingNum($pageNum:int):void
		{
			this._pagingNum = $pageNum;
			
			this._pagingText_A.text_tf.text = $pageNum; //0부터 시작하므로, 1더함.
			this._pagingText_B.text_tf.text = $pageNum;
			
		}
		
		public function get pagingNum():int
		{
			return _pagingNum;
		}
		
	}
}